﻿package com.bizmlib.data
{
	import flash.events.*;
	import com.bizmlib.net.AbstractServerConnector;
	
	
	public class AbstractDataObject extends EventDispatcher
	{
	
		public function AbstractDataObject()
		{
			init();
		}
	
	
		/**
		 * A kind of registers the provider server connector in this instance of the data object. Mainly DataObject should subscribe to listen some of the connector's events.
		 * @param	connector	a server connector
		 */
		public function addServerConnector(connector:AbstractServerConnector):void
		{
		}
		/**
		 * Basically data object should remove the listeners of the connector's events.
		 * @param	connector	a server connector
		 */
		public function removeServerConnector(connector:AbstractServerConnector):void
		{
		}
	
	
		/**
		 * Does all the initialization stuff.
		 */
		protected function init():void
		{
		}
	
	
		/**
		 * Returns a string describing the instance.
		 */
		override public function toString():String
		{
			return "[AbstractDataObject]";
		}
	}
}